package com.yiyue.graduate.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author yiyuexiaofusheng
 * @date 2021/1/18
 */
@TableName(value = "comment",resultMap = "commentMap")
public class Comment implements Serializable {

    private Long id;

    private String content;

    private Date createTime;

    @TableField("discuss_id")
    private Discuss discussId;

    @TableField("parent_comment_id")
    private Comment parentComment;

    @TableField("user_id")
    private User userId;

    private List<Comment> comments;


    @Override
    public String toString() {
        return "Comment{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", createTime=" + createTime +
                ", discussId=" + discussId +
                ", userId=" + userId +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Discuss getDiscussId() {
        return discussId;
    }

    public void setDiscussId(Discuss discussId) {
        this.discussId = discussId;
    }

    public Comment getParentComment() {
        return parentComment;
    }

    public void setParentComment(Comment parentComment) {
        this.parentComment = parentComment;
    }

    public User getUserId() {
        return userId;
    }

    public void setUserId(User userId) {
        this.userId = userId;
    }

    public List<Comment> getComments() {
        return comments;
    }

    public void setComments(List<Comment> comments) {
        this.comments = comments;
    }

    public Comment() {
    }

    public Comment(Long id, String content, Date createTime, Discuss discussId) {
        this.id = id;
        this.content = content;
        this.createTime = createTime;
        this.discussId = discussId;
    }
}
